package com.dhy.takeaway.controller;

import com.dhy.takeaway.entity.Store;
import com.dhy.takeaway.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class StoreController {
    @Autowired
    StoreService storeService;

    @PostMapping("/allStore")
    public List<Store> allStore(){
        return storeService.findAllStore();
    }

    @PostMapping("/findStore/{type}")
    public List<Store> allFood(@PathVariable("type") String type){
        return storeService.findStore(type);
    }


}
